package com.shujia.day20;

public class Student {
    private String id;
    String name;
    protected int age;
    public String like;

    public Student() {
    }

    private Student(String id) {
        this.id = id;
    }

    Student(String id, String name) {
        this.id = id;
        this.name = name;
    }

    protected Student(String id, String name, int age, String like) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.like = like;
    }

    public void fun1(){
        System.out.println("这是公共的无参成员方法");
    }

    public void fun1(String s){
        System.out.println("这是有参数成员方法"+s);
    }

    private void fun3(){
        System.out.println("这是私有的无参成员方法");
    }

    private void fun3(String s){
        System.out.println("这是私有的有参数成员方法"+s);
    }

    @Override
    public String toString() {
        return "Student{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", like='" + like + '\'' +
                '}';
    }
}
